Re: [ADMIN] how do I do dump and restore without bugging with

"Net Tree Inc." wrote:

> When I do restore it shown alot errors related with constraints.
> How can I dump and to restore from old to new without dealing with
> constraint and just forces data dump to where it suppose to belong?

What version are you dumping from and to? Exactly what errors are
you getting? (Copy and paste samples, please.)

You might want to review this page:

http://wiki.postgresql.org/wiki/Guide_to_reporting_problems

-Kevin



--
Sent via pgsql-general mailing list (pgsql-general [at] postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Kevin Grittner [ Di, 23 Februar 2010 06:02 ] [ ID #2033096 ]

Re: how do I do dump and restore without bugging with

--0016e6d64544ada55c04803ed0fa
Content-Type: text/plain; charset=ISO-8859-1

Ok, I am just trying to find the proper way to back and restore database
that contain restriction.

The other way to ask. If I have two 99% schema similar databases. The old
one might contain few columns that does not exist in the new one and contain
constrains that the new DB does not have. In that case, what's standard to
do this?

Since they are 99% similar in schema, can I do "data dump" only ? will that
work?

If owner for database between Old and new DB are different, do I must add
that owner in by create new role?

appreciated,

Steven

On Tue, Feb 23, 2010 at 1:02 PM, Kevin Grittner <Kevin.Grittner [at] wicourts.gov
> wrote:

> "Net Tree Inc." wrote:
>
> > When I do restore it shown alot errors related with constraints.
> > How can I dump and to restore from old to new without dealing with
> > constraint and just forces data dump to where it suppose to belong?
>
> What version are you dumping from and to? Exactly what errors are
> you getting? (Copy and paste samples, please.)
>
> You might want to review this page:
>
> http://wiki.postgresql.org/wiki/Guide_to_reporting_problems
>
> -Kevin
>
>
>


--
---------------------------------------
Steven Huang

--0016e6d64544ada55c04803ed0fa
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<span class=3D"Apple-style-span" style=3D"font-family: arial, sans-serif; f=
ont-size: 13px; border-collapse: collapse; ">Ok, I am just trying to find t=
he proper way to back and restore database that contain restriction.=A0<div=
><br>
</div><div>The other way to ask. If I have two 99% schema=A0similar databas=
es. The old one might contain few columns that does not exist in the new on=
e and contain constrains that the new DB does not have. In that case, what&=
#39;s standard to do this?=A0</div>
<div><br></div><div>Since they are 99% similar in schema, can I do "da=
ta dump" only ? will that work?=A0</div><div><br></div><div>If owner f=
or database between Old and new DB are different, do I must add that owner =
in by create new role?</div>
<div><br></div><div>appreciated,</div><div><br></div><div>Steven</div></spa=
n><br><div class=3D"gmail_quote">On Tue, Feb 23, 2010 at 1:02 PM, Kevin Gri=
ttner <span dir=3D"ltr"><<a href=3D"mailto:Kevin.Grittner [at] wicourts.gov">=
Kevin.Grittner [at] wicourts.gov</a>></span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex;"><div class=3D"im">"Net Tree Inc."=
=A0wrote:<br>
<br>
> When I do restore it shown alot errors related with constraints.<br>
> How can I dump and to restore from old to new without dealing with<br>
> constraint and just forces data dump to where it suppose to belong?<br=
>
<br>
</div>What version are you dumping from and to? =A0Exactly what errors are<=
br>
you getting? =A0(Copy and paste samples, please.)<br>
<br>
You might want to review this page:<br>
<br>
<a href=3D"http://wiki.postgresql.org/wiki/Guide_to_reporting_problems" tar=
get=3D"_blank">http://wiki.postgresql.org/wiki/Guide_to_repo rting_problems<=
/a><br>
<font color=3D"#888888"><br>
-Kevin<br>
<br>
<br>
</font></blockquote></div><br><br clear=3D"all"><br>-- <br>----------------=
-----------------------<br>Steven Huang<br>

--0016e6d64544ada55c04803ed0fa--
nettreeinc [ Di, 23 Februar 2010 07:39 ] [ ID #2033097 ]

Re: [ADMIN] how do I do dump and restore without bugging with

--0016e6dab0ece9463f0480410443
Content-Type: text/plain; charset=ISO-8859-1

Why am I keep getting error with version issues.... I am trying to restore a
backup file from a 8.4 postgresql server to a 8.3 postgresql server.

[postgres [at] localhost ~]$ pg_restore -C -d postgres -i isamdb.backup
pg_restore.bin: [archiver] unsupported version (1.11) in file header


On Tue, Feb 23, 2010 at 1:02 PM, Kevin Grittner <Kevin.Grittner [at] wicourts.gov
> wrote:

> "Net Tree Inc." wrote:
>
> > When I do restore it shown alot errors related with constraints.
> > How can I dump and to restore from old to new without dealing with
> > constraint and just forces data dump to where it suppose to belong?
>
> What version are you dumping from and to? Exactly what errors are
> you getting? (Copy and paste samples, please.)
>
> You might want to review this page:
>
> http://wiki.postgresql.org/wiki/Guide_to_reporting_problems
>
> -Kevin
>
>
>


--
---------------------------------------
Steven Huang

--0016e6dab0ece9463f0480410443
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div>Why am I keep getting error with version issues.... I am trying to res=
tore a backup file from a 8.4 postgresql server to a 8.3 postgresql server.=
=A0</div><div><br></div><div>[postgres [at] localhost ~]$ pg_restore -C -d postg=
res -i isamdb.backup</div>
<div>pg_restore.bin: [archiver] unsupported version (1.11) in file header</=
div><div><br></div><br><div class=3D"gmail_quote">On Tue, Feb 23, 2010 at 1=
:02 PM, Kevin Grittner <span dir=3D"ltr"><<a href=3D"mailto:Kevin.Grittn=
er [at] wicourts.gov">Kevin.Grittner [at] wicourts.gov</a>></span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex;"><div class=3D"im">"Net Tree Inc."=
=A0wrote:<br>
<br>
> When I do restore it shown alot errors related with constraints.<br>
> How can I dump and to restore from old to new without dealing with<br>
> constraint and just forces data dump to where it suppose to belong?<br=
>
<br>
</div>What version are you dumping from and to? =A0Exactly what errors are<=
br>
you getting? =A0(Copy and paste samples, please.)<br>
<br>
You might want to review this page:<br>
<br>
<a href=3D"http://wiki.postgresql.org/wiki/Guide_to_reporting_problems" tar=
get=3D"_blank">http://wiki.postgresql.org/wiki/Guide_to_repo rting_problems<=
/a><br>
<font color=3D"#888888"><br>
-Kevin<br>
<br>
<br>
</font></blockquote></div><br><br clear=3D"all"><br>-- <br>----------------=
-----------------------<br>Steven Huang<br>

--0016e6dab0ece9463f0480410443--
nettreeinc [ Di, 23 Februar 2010 10:17 ] [ ID #2033098 ]

Re: how do I do dump and restore without bugging with

It is unreasonable to expect 8.3 programs to be able to understand
everything that 8.4 programs might write.

What format is your dump in? Plain text (--format=3Dp) might work. Or
try dumping the 8.4 database with the 8.3 version of pg_dump, or maybe
use the 8.4 pg_restore against the 8.3 database.


--
Ian.


On Tue, Feb 23, 2010 at 9:17 AM, Net Tree Inc. <nettreeinc [at] gmail.com> wrote:
> Why am I keep getting error with version issues.... I am trying to restor=
e a
> backup file from a 8.4 postgresql server to a 8.3 postgresql server.
> [postgres [at] localhost ~]$ pg_restore -C -d postgres -i isamdb.backup
> pg_restore.bin: [archiver] unsupported version (1.11) in file header
>
> On Tue, Feb 23, 2010 at 1:02 PM, Kevin Grittner
> <Kevin.Grittner [at] wicourts.gov> wrote:
>>
>> "Net Tree Inc." =A0wrote:
>>
>> > When I do restore it shown alot errors related with constraints.
>> > How can I dump and to restore from old to new without dealing with
>> > constraint and just forces data dump to where it suppose to belong?
>>
>> What version are you dumping from and to? =A0Exactly what errors are
>> you getting? =A0(Copy and paste samples, please.)
>>
>> You might want to review this page:
>>
>> http://wiki.postgresql.org/wiki/Guide_to_reporting_problems
>>
>> -Kevin
>>
>>
>
>
>
> --
> ---------------------------------------
> Steven Huang
>

--
Sent via pgsql-admin mailing list (pgsql-admin [at] postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Ian Lea [ Di, 23 Februar 2010 10:35 ] [ ID #2033099 ]

Re: Re: [ADMIN] how do I do dump and restore without buggingwith constraint?

On 23/02/10 09:17, Net Tree Inc. wrote:
> Why am I keep getting error with version issues.... I am trying to restore a
> backup file from a 8.4 postgresql server to a 8.3 postgresql server.

Well, an 8.4 dump isn't always going to be compatible with an 8.3
server, is it? If there weren't differences, the version number wouldn't
have changed.

> [postgres [at] localhost ~]$ pg_restore -C -d postgres -i isamdb.backup
> pg_restore.bin: [archiver] unsupported version (1.11) in file header

Try using the 8.4 pg_restore (but keep the "-i" to tell it to ignore the
version checks). You may still see errors, but there is a good chance it
will work.

You're also restoring into the "postgres" database here - is that what
you meant to do?

--
Richard Huxton
Archonet Ltd

--
Sent via pgsql-general mailing list (pgsql-general [at] postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Richard Huxton [ Di, 23 Februar 2010 15:31 ] [ ID #2033105 ]

Re: Re: [ADMIN] how do I do dump and restore without

--0016e6db2ae76890b804804719ba
Content-Type: text/plain; charset=ISO-8859-1

yeah that's what I means to do.

How do I use 8.4 pg_restore? the DB server I am trying to restore is using
8.3. Do you mean do pg_restore on the same machine that I did pg_dump?? I am
thinking of doing that too, but I am not sure how to do the command.

Is this correct? pg_restore -h (my target machine IP) -U postgres -d (target
db) mydb.dump

Steven

On Tue, Feb 23, 2010 at 10:31 PM, Richard Huxton <dev [at] archonet.com> wrote:

> On 23/02/10 09:17, Net Tree Inc. wrote:
>
>> Why am I keep getting error with version issues.... I am trying to restore
>> a
>> backup file from a 8.4 postgresql server to a 8.3 postgresql server.
>>
>
> Well, an 8.4 dump isn't always going to be compatible with an 8.3 server,
> is it? If there weren't differences, the version number wouldn't have
> changed.
>
>
> [postgres [at] localhost ~]$ pg_restore -C -d postgres -i isamdb.backup
>> pg_restore.bin: [archiver] unsupported version (1.11) in file header
>>
>
> Try using the 8.4 pg_restore (but keep the "-i" to tell it to ignore the
> version checks). You may still see errors, but there is a good chance it
> will work.
>
> You're also restoring into the "postgres" database here - is that what you
> meant to do?
>
> --
> Richard Huxton
> Archonet Ltd
>



--
---------------------------------------
Steven Huang

--0016e6db2ae76890b804804719ba
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

yeah that's what I means to do. <br><br>How do I use 8.4 pg_restore? th=
e DB server I am trying to restore is using 8.3. Do you mean do pg_restore =
on the same machine that I did pg_dump?? I am thinking of doing that too, b=
ut I am not sure how to do the command. <br>
<br>Is this correct? pg_restore -h (my target machine IP) -U postgres -d (t=
arget db) mydb.dump<br><br>Steven<br><br><div class=3D"gmail_quote">On Tue,=
Feb 23, 2010 at 10:31 PM, Richard Huxton <span dir=3D"ltr"><<a href=3D"=
mailto:dev [at] archonet.com">dev [at] archonet.com</a>></span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"border-left: 1px solid rgb(204, =
204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class=3D"im"=
>On 23/02/10 09:17, Net Tree Inc. wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"border-left: 1px solid rgb(204, =
204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Why am I keep getting error with version issues.... I am trying to restore =
a<br>
backup file from a 8.4 postgresql server to a 8.3 postgresql server.<br>
</blockquote>
<br></div>
Well, an 8.4 dump isn't always going to be compatible with an 8.3 serve=
r, is it? If there weren't differences, the version number wouldn't=
have changed.<div class=3D"im"><br>
<br>
<blockquote class=3D"gmail_quote" style=3D"border-left: 1px solid rgb(204, =
204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
[postgres [at] localhost ~]$ pg_restore -C -d postgres -i isamdb.backup<br>
pg_restore.bin: [archiver] unsupported version (1.11) in file header<br>
</blockquote>
<br></div>
Try using the 8.4 pg_restore (but keep the "-i" to tell it to ign=
ore the version checks). You may still see errors, but there is a good chan=
ce it will work.<br>
<br>
You're also restoring into the "postgres" database here - is =
that what you meant to do?<br><font color=3D"#888888">
<br>
-- <br>
=A0Richard Huxton<br>
=A0Archonet Ltd<br>
</font></blockquote></div><br><br clear=3D"all"><br>-- <br>----------------=
-----------------------<br>Steven Huang<br>

--0016e6db2ae76890b804804719ba--
nettreeinc [ Di, 23 Februar 2010 17:32 ] [ ID #2033106 ]
Datenbanken » gmane.comp.db.postgresql.admin » Re: [ADMIN] how do I do dump and restore without bugging with

Vorheriges Thema: Sharing /etc/passwd with PostgreSQL
Nächstes Thema: pg_dump: aborting because of version mismatch